﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Stock.Core.MongoDB;
using Stock.Model;
using Stock.Model.ViewModels;

namespace Stock.Core.Service
{
    public interface IStock1Service
    {
        Task<stock1_m> insert(stock_1 model);
        Task<BaseResult> getList(DateTime? starttime);
        Task<bool> count1(long starttime, long endtime, DateTime dtendtime);
        Task<bool> count5(long starttime, long endtime, DateTime dtendtime);
        Task<bool> count15(long starttime, long endtime, DateTime dtendtime);
		Task<bool> count30(long starttime, long endtime, DateTime dtendtime);
		Task<bool> count60(long starttime, long endtime, DateTime dtendtime);
		Task<bool> count4h(long starttime, long endtime, DateTime dtendtime);
        Task<bool> count1d(long starttime, long endtime, DateTime dtendtime);
        Task<BaseResult> get15Last();
        Task<BaseResult> get15Today(long time);
        Task<BaseResult> get5Last();
        Task<BaseResult> get5Today(long time);
        Task<BaseResult> get1Last();
        Task<BaseResult> get1Today(long time);

        Task<BaseResult> get30Today(long time);
        Task<BaseResult> get60Today(long time);
        Task<BaseResult> get4hToday(long time);
        Task<BaseResult> get1dToday(long time);

        Task<double> todayHigh();
        Task<double> todayLow();

        Task<BaseResult> getfirst(long time);

        Task<bool> insert5(K5ViewData data);
        Task<bool> Insert15(K5ViewData data);
        Task<bool> Insert30(K5ViewData data);
        Task<bool> Insert60(K5ViewData data);
        Task<bool> Insert4h(K5ViewData data);
        Task<bool> Insert1d(K5ViewData data);
        Task<bool> insert1(K5ViewData data);
        Task<BaseResult> get1Top();
        Task<BaseResult> get15Top();
        Task<BaseResult> get5Top();
        Task<BaseResult> get51000();
        Task<BaseResult> get151000();
        Task<BaseResult> get11000();
        Task<BaseResult> get301000();
        Task<BaseResult> get601000();

        Task<BaseResult> inserts60(List<stock60_m> list);
        Task<BaseResult> inserts30(List<stock30_m> list);
        Task<BaseResult> inserts1(List<stock1_m> list);
        Task<BaseResult> inserts15(List<stock15_m> list);
        Task<BaseResult> inserts5(List<stock5_m> list);
    }
}
